<template>
  <el-table :data="tableData" style="width: 100%; height: 100%" stripe>
    <el-table-column prop="drugName" label="药品名称" />
    <el-table-column prop="dose" label="计量" />
    <el-table-column prop="office" label="所在科室" />
    <el-table-column prop="drugTime" label="时间" />
  </el-table>
</template>
<script setup>
import { onMounted,ref } from "vue";
import { getDrugs } from "@/api/index.js";
const tableData = ref([]);
const props = defineProps({
  childMessage: String
});
onMounted(() => {
   getDrugs(props.childMessage).then((res) => {
      console.log(res);
      console.log(props.childMessage,"5555");
      
      tableData.value = res
  });
});
</script>
<style lang="scss" scoped></style>
